export function throttle(fn, delay = 300) {
    let lastTime = 0
    return function(...args) {
        const now = Date.now()
        if (now - lastTime >= delay) {
            fn.apply(this, args)
            lastTime = now
        }
    }
}

export function thrs(fn, delay = 300) {
    let lastTime = 0
    return function(...agrs) {
        const now = Date.now()
        if (now - lastTime >= delay) {
            fn.apply(this, agrs)
            lastTime = now
        }
    }
}